package MailSystem.States;

import MailSystem.Connection;
import MailSystem.TelephoneResources;

public class ResendStatus implements State {

	@Override
	public void runAction(Connection c, String key)
	{
		if (key.equals("#")) {
			String list[] = {c.getAccumulatedKeys()};
			c.getCurrentMailbox().resendCurrentMessage(list);				
			c.setState(Connection.MESSAGEMENU);			
			c.showDisplayAllPhones(TelephoneResources.MESSAGE_MENU_TEXT);
			c.setAccumulatedKeys("");
		} else
			c.setAccumulatedKeys(c.getAccumulatedKeys() + key);
	}
}
